import {lazy} from "react";
import {Navigate, createBrowserRouter} from "react-router-dom";

const Home = lazy(() => import("@/pages/home"));
const Login = lazy(() => import("@/pages/login/login"));
const Content = lazy(() => import("@/pages/content"));

const list: any = [
    {
        path: "/",
        element: <Navigate to="/login" />,
    },
    {
        path: "/home",
        element: <Home />,
    },
    {
        path: "/content/:id",
        element: <Content />,
    },
    {
        path: "/login",
        element: <Login />,
    },
];

const routers = createBrowserRouter(list);
export default routers;
